﻿using System.ComponentModel;
using System.Drawing;
using System.Windows.Forms;

namespace StockUI
{
    [DesignTimeVisible(false)]
    public class FormAbstractChild : FormAbstract
    {    
        public FormAbstractChild()
        {
            this.Dock = DockStyle.Fill;
            this.FormBorderStyle = FormBorderStyle.None;
            this.KeyPreview = true;
            this.BackColor = Color.Black;
            this.ForeColor = Color.White;
            //this.Font = new Font("isi_ansi", 9, FontStyle.Regular);
        }

        protected bool IsActive
        {
            get
            {
                return FormParent.ActiveFormChild == this;
            }
        }

        protected FormAbstractParent FormParent
        {
            get
            {
                return TopLevelControl as FormAbstractParent;
            }
        }

        protected FormAbstractChild FindFormChild(string name)
        {
            if (FormParent != null)
                return FormParent.FindFormChild(name);

            return null;
        }
    }
}
